{% extends "inner.html" %}
{% block title %}LiveSociety - Preferencias{% endblock %}
{% block content %}
	<form name="page" action="">
		<input type="hidden" name="section" value="Preferencias">
	</form>
		<div id="body_wrapper">
			<div id="body_content_top">
				<b class="msgbox">{{ msgbox|default:"" }}</b>
				<div id="middle_box">
					<div class="rb_title">
						Preferencias
					</div>
						<form method="post" action="/updatesettings" enctype="multipart/form-data">
							{% csrf_token %}
							<table cellspacing="0" cellpadding="1">
								<tr>
									<td><label>Nombre</label></td>
									<td><input type="text" name="name" value="{{ c_user.name }}"></td>
								</tr>
								<tr>
									<td><label>Apellido</label></td>
									<td><input type="text" name="lastname" value="{{ c_user.lastname }}"/></td>
								</tr>
								<tr>
									<td><label>Mail</label></td>
									<td><input type="text" name="mail" value="{{ c_user.mail }}" readonly="readonly"/></td>
								</tr>
								<tr>
									<td><label>G&eacute;nero</label></td>
									<td>
										<select name="gender">
											{% if c_user.gender == "m" %}
											<option value="m">Masculino</option>
											<option value="f">Femenino</option>
											{% else %}
											<option value="f">Femenino</option>
											<option value="m">Masculino</option>
											{% endif %}
									</select>
									</td>
								</tr>
								<tr>
									<td><label>Fecha de nacimiento</label></td>
									<td><input type="text" name="birthday" value="{{ c_user.birthday }}"/><label>&nbsp;DD/MM/AAAA</label></td>
								</tr>
								<tr>
									<td><label>Biograf&iacute;a</label></td>
									<td><input type="text" name="bio" value="{{ c_user.bio }}"/></td>
								</tr>
								<tr>
									<td><label>Nueva contraseña</label></td>
									<td><input type="password" name="password"/><label>&nbsp;Si no desea cambiar su contraseña solo deje el cuadro en blanco</label></td>
								</tr>
								<tr>
									<td><label>Confirme nueva contraseña</label></td>
									<td><input type="password" name="password_c"/></td>
								</tr>
								<tr>
									<td><label>Avatar actual</label></td>
									<td>
										<div class="friend_avatar">
										{% if c_user.avatar != None %}
											<img src="{{ c_user.avatar }}" width="100%" height="100%">
										{% else %}
											<img src="/static/img/no_avatar.jpg" width="100%" height="100%">
										{% endif %}
										</div>
									</td>
									
								</tr>
								<tr>
									<td><label>Nuevo avatar</label></td>
									<td><input type="file" name="avatar"/></td>
								</tr>
								<tr>
									<td></td>
									<td><input type="submit" value="Cambiar datos"/></td>
								</tr>
							</table>
						</form>
					</div>
				</div>
			</div>
{% endblock %}
